<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>车辆管理</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f2f2f2;
            margin: 0;
            padding: 20px;
        }
        .container {
            max-width: 600px;
            margin: 0 auto;
            background-color: #fff;
            padding: 20px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            border-radius: 10px;
        }
        h1 {
            text-align: center;
            color: #333;
        }
        form {
            display: flex;
            flex-direction: column;
            margin-bottom: 20px;
        }
        .form-group {
            display: flex;
            justify-content: space-between;
            margin-bottom: 20px;
        }
        .form-group label {
            flex-basis: 25%;
            margin-bottom: 5px;
            font-weight: bold;
        }
        .form-group input[type="text"] {
            flex-basis: 70%;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }
        button {
            padding: 10px;
            background-color: #4CAF50;
            color: #fff;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }
        button:hover {
            background-color: #45a049;
        }
        .form-title {
            margin-bottom: 20px;
            color: #555;
            font-size: 1.2em;
            border-bottom: 1px solid #ccc;
            padding-bottom: 10px;
        }
    </style>
</head>
<body>

<div class="container">
    <h1>车辆管理</h1>

    <div>
        <div class="form-title">添加车辆</div>
        <form action="http://127.0.0.1:8001/add" method="post">
            <div class="form-group">
                <label for="number">车牌号：</label>
                <input type="text" name="number" id="number">
            </div>
            <div class="form-group">
                <label for="type">车辆类型：</label>
                <input type="text" name="type" id="type">
            </div>
            <div class="form-group">
                <label for="color">车辆颜色：</label>
                <input type="text" name="color" id="color">
            </div>
            <div class="form-group">
                <label for="brand">车辆品牌：</label>
                <input type="text" name="brand" id="brand">
            </div>
            <div class="form-group">
                <label for="price">车辆价格：</label>
                <input type="text" name="price" id="price">
            </div>
            <div class="form-group">
                <label for="description">车辆描述：</label>
                <input type="text" name="description" id="description">
            </div>
            <button type="submit" id="add">提交</button>
        </form>
    </div>

    <div>
        <div class="form-title">删除车辆</div>
        <form action="http://127.0.0.1:8001/delete" method="post" enctype="application/x-www-form-urlencoded">
            <div class="form-group">
                <label for="delete-number">车牌号：</label>
                <input type="text" name="number" id="delete-number">
            </div>
            <button type="submit" id="delete">删除</button>
        </form>
    </div>

    <div>
        <div class="form-title">查询所有车辆</div>
        <form action="http://127.0.0.1:8001/list" method="get">
            <button type="submit" id="get">查询所有</button>
        </form>
    </div>

    <div>
        <div class="form-title">修改车辆信息</div>
        <form action="http://127.0.0.1:8001/update" method="post">
            <div class="form-group">
                <label for="update-number">车牌号：</label>
                <input type="text" name="number" id="update-number">
            </div>
            <div class="form-group">
                <label for="update-type">车辆类型：</label>
                <input type="text" name="type" id="update-type">
            </div>
            <div class="form-group">
                <label for="update-color">车辆颜色：</label>
                <input type="text" name="color" id="update-color">
            </div>
            <div class="form-group">
                <label for="update-brand">车辆品牌：</label>
                <input type="text" name="brand" id="update-brand">
            </div>
            <div class="form-group">
                <label for="update-price">车辆价格：</label>
                <input type="text" name="price" id="update-price">
            </div>
            <div class="form-group">
                <label for="update-description">车辆描述：</label>
                <input type="text" name="description" id="update-description">
            </div>
            <button type="submit" id="update">修改</button>
        </form>
    </div>
</div>

</body>
</html>
